package homework.api.day08;

import java.io.FileOutputStream;
import java.io.IOException;

public class FinallyDemo2 {
    public static void main(String[] args) {

        FileOutputStream fos = null;
        try{
            fos = new FileOutputStream("./a/b/c/d/pwNote.txt");
        }catch (IOException e){
            System.out.println("出现IO异常关闭");
        }finally {
            try {
                fos.close();
            } catch (Exception e) {
                System.out.println("关闭流时出现异常关闭");
            }
        }
    }
}
